/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package knazzy.logic;

import java.util.logging.Level;
import java.util.logging.Logger;
import knazzy.gui.Dice;

/**
 *
 * @author 76167
 */
public class DiceAnimation implements Runnable {

    Dice d = new Dice();
    DiceController dc = new DiceController();

    public DiceAnimation(Dice pDice){
        d = pDice;
    }

    public void run() {
        for(int i=0;i<=20;i++){
            dc.throwDice(d);
            try {
                Thread.sleep(50);
            } catch (InterruptedException ex) {
                Logger.getLogger(DiceAnimation.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

}
